<html>
<head><meta charset="utf-8"><title>eager expansion · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/eager.20expansion.html">eager expansion</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="134601658"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/eager%20expansion/near/134601658" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/eager.20expansion.html#134601658">(Sep 25 2018 at 14:48)</a>:</h4>
<p><span class="user-mention" data-user-id="123856">@Vadim Petrochenkov</span> Hey, a few macro-related questions if you don't mind...</p>



<a name="134601668"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/eager%20expansion/near/134601668" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/eager.20expansion.html#134601668">(Sep 25 2018 at 14:48)</a>:</h4>
<p>the macro "collection" code is a bit cryptic to me<br>
this is where it gathers tokens into invocations right?<br>
an unfortunate lack of comments<br>
any clarification would be appreciated</p>



<a name="134632483"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/eager%20expansion/near/134632483" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/eager.20expansion.html#134632483">(Sep 25 2018 at 22:40)</a>:</h4>
<p>Do you mean <code>InvocationCollector</code> in <a href="http://expand.rs" target="_blank" title="http://expand.rs">expand.rs</a>?</p>



<a name="134632530"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/eager%20expansion/near/134632530" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/eager.20expansion.html#134632530">(Sep 25 2018 at 22:41)</a>:</h4>
<p>Yes, it visits an AST fragment and collects all macro invocations, of any form - <code>m!()</code>/<code>#[a]</code>/<code>#[derive(D)]</code></p>



<a name="134632722"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/eager%20expansion/near/134632722" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vadim Petrochenkov <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/eager.20expansion.html#134632722">(Sep 25 2018 at 22:46)</a>:</h4>
<p>It's a folder rather than visitor because it leaves stubs (placeholders) in place of macro invocations and also performs <code>cfg</code> expansion.</p>



<a name="134706365"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/eager%20expansion/near/134706365" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/eager.20expansion.html#134706365">(Sep 26 2018 at 22:04)</a>:</h4>
<p>Okay, thanks. I'll have a closer look shortly.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>